package movee.domain.api;

import movee.domain.exception.AppStatusCode;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.ToString;

/**
 *
 *
 * @author movee
 */
@Data
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class ExtendedSuccessResponse<T extends ResponseData<?>> extends ApiResponse {

    private T data;

    public ExtendedSuccessResponse(final T data) {
        super(AppStatusCode.OK.getCode(), "success");
        this.data = data;
    }

    public ExtendedSuccessResponse(final String message, final T data) {
        super(AppStatusCode.OK.getCode(), message);
        this.data = data;
    }

}
